import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store/index";
import Vant from "vant";
import "vant/lib/index.css";
import axios from "axios";
// import { Toast } from 'vant'

Vue.use(Vant);

// axios配置根路径
axios.defaults.baseURL = "https://reg.mahelei.com/wanhao/index"; //开发完成后，必须配置真正的请求地址
// axios.defaults.baseURL = 'http://127.0.0.1:8081' //开发阶段，配合proxy处理跨域问题
axios.defaults.headers["Content-Type"] = "multipart/form-data"; //指定请求头类型
// axios挂在到全局原型上,命名$http
Vue.prototype.$http = axios;

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);

Vue.config.productionTip = false; //vue提示消息

const app = new Vue({
  router,
  store,
  render: (h) => h(App),
});
app.$mount("#app");
